package com.hhit.bigscreenbackmanage.controller.tgygl;

import com.alibaba.fastjson.JSONObject;
import com.hhit.bigscreenbackmanage.common.Response;
import com.hhit.bigscreenbackmanage.service.tgygl.TJdglGtService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/tgygl/tJdglGt")
public class TJdglGtController {
    private Logger log = LoggerFactory.getLogger(TJdglGtController.class);

    @Autowired
    private TJdglGtService tJdglGtService;

    @RequestMapping("/getTJdglGt")
    public Response getTJdglGt(@RequestBody JSONObject jsonObject){
        try{
            Map<String, Object> result = tJdglGtService.queryTJdglGt(jsonObject);
            return Response.createResponseBySuccess("查询杆塔信息成功",result);
        }catch (Exception e){
            log.error("查询杆塔信息失败: " + e.getMessage());
            return Response.createResponseByError("查询杆塔信息失败");
        }
    }
}
